import {createApp} from 'vue';
import pinia from '/@/stores/index';
import App from '/@/App.vue';
import router from '/@/router';
import {directive} from '/@/directive/index';
import {i18n} from '/@/i18n/index';
import other from '/@/utils/other';
import {useDict} from '/@/utils/dict';

import ElementPlus from 'element-plus';
import '/@/theme/index.scss';

import 'virtual:uno.css';

import VueGridLayout from 'vue-grid-layout';
// 字典标签组件
import DictTag from '/@/components/DictTag/index.vue';
// 文件上传组件
import FileUpload from "/@/components/FileUpload/index.vue"
// 图片上传组件
import ImageUpload from "/@/components/ImageUpload/index.vue"
// 图片预览组件
import ImagePreview from "/@/components/ImagePreview/index.vue"
// 自定义表格工具组件
import RightToolbar from "/@/components/RightToolbar/index.vue"
// 图片预览组件

const app = createApp(App);

// 全局方法挂载
app.config.globalProperties.useDict = useDict
// 全局组件挂载
app.component('DictTag', DictTag)
app.component('FileUpload', FileUpload)
app.component('ImageUpload', ImageUpload)
app.component('ImagePreview', ImagePreview)
app.component('RightToolbar', RightToolbar)

directive(app);
other.elSvg(app);

app.use(pinia)
    .use(router)
    .use(ElementPlus)
    .use(i18n)
    .use(VueGridLayout)
    .mount('#app');
